package com.guan.study.poi;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.Date;

/**
 * @Date: 2023/7/18 14:40
 * @Author: yaobai
 * @Description: 用例导出vo
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ApiModel(value = "用例导出列名")
@ContentStyle(
        horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderTop = BorderStyleEnum.THIN,
        borderBottom = BorderStyleEnum.THIN,
        borderLeft = BorderStyleEnum.THIN,
        borderRight = BorderStyleEnum.THIN)
@ContentRowHeight(25)
public class UseCaseExportVo {

    //来自用例表，其他默认来自用例表
    @ApiModelProperty(value = "用例编号")
    @ExcelProperty("用例编号")
    @ColumnWidth(15)
    private String caseNo;

    //来自验证点表
    @ApiModelProperty(value = "功能模块")
    @ExcelProperty("功能模块")
    @ColumnWidth(15)
    private String module; //来自验证点表

    //来自验证点表
    @ApiModelProperty(value = "验证点")
    @ExcelProperty("验证点")
    @ColumnWidth(15)
    private String point;

    //来自验证点表
    @ApiModelProperty(value = "前置条件")
    @ExcelProperty("前置条件")
    @ColumnWidth(15)
    private String precondition;

    @ApiModelProperty(value = "操作步骤")
    @ExcelProperty("操作步骤")
    @ColumnWidth(15)
    private String step;

    @ApiModelProperty(value = "预期结果")
    @ExcelProperty("预期结果")
    @ColumnWidth(15)
    private String preResult;

    //来自验证点表
    @ApiModelProperty(value = "编写人")
    @ExcelProperty("编写人")
    @ColumnWidth(15)
    private String editor;//来自验证点表

    //来自验证点表
    @ApiModelProperty(value = "备注")
    @ExcelProperty("备注")
    @ColumnWidth(15)
    private String remark;

    @ApiModelProperty(value = "开发用例执行结果（1.通过 2.不通过3部分通过4.未执行）")
    @ExcelProperty(value = {"开发用例执行结果","开发用例执行结果"})
    @ColumnWidth(20)
    private String devResult;

    @ApiModelProperty(value = "开发更新时间")
    @ExcelProperty({"开发用例执行结果","开发更新时间"})
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(20)
    private Date devUpdateTime;

    @ApiModelProperty(value = "开发完成人姓名")
    @ExcelProperty({"开发用例执行结果","开发完成人姓名"})
    @ColumnWidth(20)
    private String devFinishUserName;

    //来自验证点表
    @ApiModelProperty(value = "开发备注")
    @ExcelProperty({"开发用例执行结果","开发备注"})
    @ColumnWidth(20)
    private String devRemark;

    @ApiModelProperty(value = "测试用例执行结果（1.通过 2.不通过3部分通过4.未执行）")
    @ExcelProperty(value = {"测试用例执行结果","测试用例执行结果"})
    @ColumnWidth(20)
    private String testResult;

    @ApiModelProperty(value = "测试完成人姓名")
    @ExcelProperty({"测试用例执行结果","测试完成人姓名"})
    @ColumnWidth(20)
    private String testUser;

    @ApiModelProperty(value = "测试更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty({"测试用例执行结果","测试更新时间"})
    @ColumnWidth(20)
    private Date testUpdateTime;

    //来自验证点表
    @ApiModelProperty(value = "测试备注")
    @ExcelProperty({"测试用例执行结果","测试备注"})
    @ColumnWidth(20)
    private String testRemark;

    @ApiModelProperty(value = "灰度用例执行结果（1.通过 2.不通过3部分通过4.未执行）")
    @ExcelProperty(value = {"灰度用例执行结果","灰度用例执行结果"})
    @ColumnWidth(20)
    private String hdResult;

    @ApiModelProperty(value = "灰度完成人姓名")
    @ExcelProperty({"灰度用例执行结果","灰度完成人姓名"})
    @ColumnWidth(20)
    private String huUser;

    @ApiModelProperty(value = "灰度更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty({"灰度用例执行结果","灰度更新时间"})
    @ColumnWidth(20)
    private Date hdUpdateTime;

    //来自验证点表
    @ApiModelProperty(value = "灰度备注")
    @ExcelProperty({"灰度用例执行结果","灰度备注"})
    @ColumnWidth(20)
    private String hdRemark;

    @ApiModelProperty(value = "生产用例执行结果（1.通过 2.不通过3部分通过4.未执行）")
    @ExcelProperty(value = {"生产用例执行结果","生产用例执行结果"})
    @ColumnWidth(20)
    private String prodResult;

    @ApiModelProperty(value = "生产完成人姓名")
    @ExcelProperty({"生产用例执行结果","生产完成人姓名"})
    @ColumnWidth(20)
    private String prodUser;

    @ApiModelProperty(value = "生产更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty({"生产用例执行结果","生产更新时间"})
    @ColumnWidth(20)
    private Date prodUpdateTime;

    //来自验证点表
    @ApiModelProperty(value = "生产备注")
    @ExcelProperty({"生产用例执行结果","生产备注"})
    @ColumnWidth(20)
    private String prodRemark;


}
